package com.example.shop.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.example.shop.pojo.Department;
import com.example.shop.pojo.DepartmentDto;

@Mapper
public interface DepartmentMapper {
	/**
	 * 添加部门
	 */
	int add(Department department);
	/**
	 * 删除部门
	 */
	int deleteByDepartmentId(Department department);
	/**
	 * 根据部门id查询同级的部门基本信息
	 */
	List<DepartmentDto> selectBaseInfo(@Param("departmentFatherId") Long departmentFatherId,@Param("list") List<Long> departmentIds);
	/**
	 * 根据父级id查询
	 */
	List<Department> selectByDepartmentFatherId(Department department);
}
